/**
 * @孙武
 * 指定api
 */

import request from './request'
/*
 example
 export const imgUpload = config.host + 'api/upload/img';
 export const addAdminUser = (data) => request('api/admin/addAdminUser',data,'post');
 export const workDownload = (data) => request('api/work/downloadZip', data, 'download');//下载的特殊用法
 export const workUpload = (data) => request('api/work/upload', data, "UPLOAD");
 export const companySoftUsageCount=(data)=>request("companysoftusage/",data,"restful");
*/
export const softwareUsageInfo = (data) => request('softwareUsageInfo/', data, 'restful')
export const CompanyList = () => request('', `select c,count(c) from d where c <> '-1' group by  c order by count(c) desc limit 100`, 'sql')
//select * from (select p,n,count(p)as nums  from d where d.c='360.cn' group by p,n  order by n desc limit 100) as temp order by nums desc
export const CompanySoftwareList = (data) => request('', `select * from (select p as spname,n as sname,count(p)as nums  from d where d.c='${data}' group by p,n  order by n desc limit 100) as temp order by nums desc`, 'sql')
